package com.example.springboot.control;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/sync_list")
public class sync_list_ctrl {
    @Autowired
    @Qualifier("primaryJdbcTemplate")
    JdbcTemplate jdbc;


    @GetMapping("/findAll")
    public List<Map<String, Object>> findAll(){
        return  jdbc.queryForList("select * from sync_list order by 1,2 ");
    }}